<?php
namespace Admin\Controller;
class AddUserlistController extends BaseController {
    public function index(){
        $this->display();
        //echo "添加用户";
    }
    public function Add(){
        $data = I('post.');
        $data['password'] = MD5(MD5($data['password'])."zdsoft");
        $data['time'] = date('Ymd');
        $addUser = M('user');
        $rs = $addUser->add($data);
        if(!empty($rs)){
            $array = array('status'=>"1",'info'=>"添加成功",'url'=>U('UserList/index'));
        }else{
            $array = array('status'=>"1",'info'=>"添加失败",'url'=>U('UserList/index'));
        }
        $this->ajaxReturn($array);
    }
}